#e
#Title[ޕru̓ޕrƂ-Hard-vʒuύXver]
#Text[G@uLXv
Overł͂炪]
#ScriptVersion[2]
#Player[FREE]
#PlayLevel[Easy]

script_enemy_main {
 let img = "script\img\ExRumia.png";
 let name = "ޕru̓ޕrƂ-Hard-v";

 @Initialize {
  CutIn(KOUMA, name, "", 0, 0, 0, 0);
  SetX(GetClipMaxX);
  SetY(GetClipMinY);
  SetLife(5000);
  SetScore(1000000);

  LoadGraphic(img);
  SetTexture(img);
  SetGraphicRect(0, 0, 64, 64);

  TMain;
 }

 @MainLoop {
  SetCollisionA(GetX, GetY, 24);
  SetCollisionB(GetX, GetY, 24);

  yield;
 }

 @DrawLoop {
  DrawGraphic(GetX, GetY);
 }

 @Finalize {
  DeleteGraphic(img);
 }

 task TMain {
  yield;

  TShot;
  TShot1;
  TMove;
 }

 task TShot {
  yield;

  loop {
   loop(30) { yield; }
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), RED11, 0);
  }
 }

 task TShot1 {
  yield;

  loop {
   loop(30) { yield; }
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
   CreateShot01(GetX, GetY, rand(1, 2), rand(90, 270), WHITE11, 0);
  }
 }

 task TMove {
  yield;

  loop {
   wait(30);

   loop(2) { yield; }
   SetMovePosition01(GetClipMaxX, GetClipMaxY, 2);
   wait(270);

   loop(1) { yield; }
   SetMovePosition02(GetClipMaxX, GetClipMinY, 0);   
  }
 }

 function wait(w) {
  loop(w) { yield; }
 }

}